var connector = require("../../../src/runtime/jaba");

(function($service$){
var $input$ = {};

/* Init code */

/* Remote code */
var $script$ = 'for product in root.Products do (if (((product.UnitsInStock > 0) && (product.UnitPrice > 3))) then (g0:product.ProductName) end; ) end; ';
var $batch$ = $service$.execute($script$, $input$, function($result$) {

/* Local code */
console.log("In-stock products that cost more than $3.00:");
$result$.getIteration("product").forEach(function(product){
console.log((product.getString("g0") + " is in stock and costs more than $3.00."));
});

});
})(connector);